package org.jeecg.modules.knowledgerelation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.knowledgerelation.KnowledgeTreeVO;
import org.jeecg.modules.knowledgerelation.entity.KnowledgeRelation;

import java.util.List;

/**
 * @Description: 知识之间的关系
 * @Author: jeecg-boot
 * @Date:   2020-12-20
 * @Version: V1.0
 */
public interface KnowledgeRelationMapper extends BaseMapper<KnowledgeRelation> {

    /**
     * TODO: 分页获取知识关系信息
     *
     *
     * @author ZhangHaoyu
     * @param page
     * @return java.util.List<org.jeecg.modules.knowledgerelation.entity.KnowledgeRelation>
     */
    List<KnowledgeRelation> queryKnowledgeInfo(Page<KnowledgeRelation> page);

    /**
     * TODO: 获取知识关系维护成的树结构
     *
     *
     * @author ZhangHaoyu
     * @param
     * @return java.util.List<org.jeecg.modules.knowledgerelation.KnowledgeTreeVO>
     */
    List<KnowledgeTreeVO> getTree();

    /**
     * TODO: 根据知识id获取知识关系维护成的树结构
     *
     *
     * @author ZhangHaoyu
     * @param
     * @return java.util.List<org.jeecg.modules.knowledgerelation.KnowledgeTreeVO>
     */
    List<KnowledgeTreeVO> getTreeByknowledge(@Param("id") String id);
}
